#ifndef __DHT11_H
#define __DHT11_H

#include "stm32f10x.h"                  // Device header
#include "delay.h"

#define DHT11_PIN   GPIO_Pin_0
#define DHT11_PORT  GPIOA
#define DHT11_CLK   RCC_APB2Periph_GPIOA

#define DHT11_HIGH  GPIO_SetBits(DHT11_PORT, DHT11_PIN)
#define DHT11_LOW   GPIO_ResetBits(DHT11_PORT, DHT11_PIN)
#define DHT11_READ  GPIO_ReadInputDataBit(DHT11_PORT, DHT11_PIN)

void DHT11_Init(void);
uint8_t DHT11_Read_Data(uint16_t *temp, uint16_t *humi);

#endif
